package com.fBlog.pojo;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@Entity  
@Table(name="tspeak") 
@DynamicInsert(true)
@DynamicUpdate(true)
public class Tspeak implements java.io.Serializable{
	//序号
	private String id;
	//创建时间
	private Date createTime;
	//标题
	private String title;
	//内容
	private String content;
	//图片
	private String picture;
	//点赞
	private String good;
	//浏览次数
	private int viewQty;
	
	//所属用户
	private Tuser user;

	public int getViewQty() {
		return viewQty;
	}

	public void setViewQty(int viewQty) {
		this.viewQty = viewQty;
	}

	@Id
	@Column(name = "ID", nullable = false, length = 36)
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USERID")
	public Tuser getUser() {
		return user;
	}
	public void setUser(Tuser user) {
		this.user = user;
	}
	@Column(length = 10240)
	public String getPicture() {
		return picture;
	}
	public void setPicture(String picture) {
		this.picture = picture;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(length = 2550)
	public String getGood() {
		return good;
	}
	public void setGood(String good) {
		this.good = good;
	}
}
